# $Id: PKGBUILD 89360 2013-04-28 20:21:26Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

pkgname=sensors-applet
pkgver=3.0.0
pkgrel=3
pkgdesc="Applet for GNOME Panel to display readings from hardware sensors, including CPU temperature, fan speeds and voltage readings"
arch=('i686' 'x86_64')
url="http://sensors-applet.sourceforge.net/"
license=('GPL')
depends=('gnome-panel' 'libatasmart' 'lm_sensors' 'xdg-utils')
makedepends=('intltool' 'gnome-doc-utils')
optdepends=('hddtemp: get HDD temperatures'
            'udisks: get HDD temperatures')
options=('!libtool')
install=$pkgname.install
source=(http://downloads.sourceforge.net/sensors-applet/$pkgname-$pkgver.tar.gz
        gtk38.patch)
md5sums=('425078fc1ff5a98af1547e039002a73f'
         '7289cb0acd5c05daf824df6a90967240')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # Enable reprecations
  sed -i '/CFLAGS+=/d' configure{,.ac}

  # Fix compatibility with GTK+ 3.8
  patch -Np1 -i "$srcdir/gtk38.patch"

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \
              --disable-static --disable-scrollkeeper --with-nvidia=no
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}
